package com.gryffonx.utils;

import javax.swing.*;
import javax.swing.table.DefaultTableCellRenderer;
import java.awt.*;

/**
 * **************************************************************************
 * Application:
 * Author: Erik Stell
 * Date: Feb 8, 2005
 * Time: 1:24:22 PM
 * Process:
 * **************************************************************************
 */
public class TimelineTableCellRenderer extends DefaultTableCellRenderer {

    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        Component renderer = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);

        if (1 == row % 2) {
            renderer.setBackground(new Color(255, 255, 229));
        } else {
            renderer.setBackground(Color.white);

        }
        return renderer;
    }
}
